﻿@model MVCHelloworld.Models.Book

@{
 ViewBag.Title = "新增图书 - MvcBook";
}

<h2>新增图书</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
 @Html.ValidationSummary(true)
<fieldset>
<legend>图书</legend>

<div class="editor-label">
图书名称
</div>
<div class="editor-field">
 @Html.EditorFor(model => model.BookName)
 @Html.ValidationMessageFor(model => model.BookName)
</div>

<div class="editor-label">
作者
</div>
<div class="editor-field">
 @Html.EditorFor(model => model.Author)
 @Html.ValidationMessageFor(model => model.Author)
</div>

<div class="editor-label">
出版社
</div>
<div class="editor-field">
 @Html.EditorFor(model => model.Publisher)
 @Html.ValidationMessageFor(model => model.Publisher)
</div>

<div class="editor-label">
价格
</div>
<div class="editor-field">
 @Html.EditorFor(model => model.Price)
 @Html.ValidationMessageFor(model => model.Price)
</div>

<div class="editor-label">
备注
</div>
<div class="editor-field">
 @Html.EditorFor(model => model.Remark)
 @Html.ValidationMessageFor(model => model.Remark)
</div>

<p>
<input type="submit" value="增加"/>
</p>
</fieldset>
}

<div>
 @Html.ActionLink("Back to List", "Index")
</div>